<template>
  <div style="background-color: white">
    <div class="probox">
       <router-link to="/index/product"><el-page-header @back="goBack" content="商品详情"> </el-page-header></router-link>
    </div>
    <el-divider></el-divider>
    <div>
      <div class="tag-group">
        <el-tag>商品名称</el-tag><span class="tag-group__title">{{tableData.name}}</span>
      </div>
      <el-divider><i class="el-icon-mobile-phone"></i></el-divider>
      <div class="tag-group">
        <el-tag>商品描述</el-tag><span class="tag-group__title">{{tableData.desc}}</span>
      </div>
      <el-divider><i class="el-icon-mobile-phone"></i></el-divider>
      <div class="tag-group">
        <el-tag>商品价格</el-tag><span class="tag-group__title">{{tableData.price}}元</span>
      </div>
      <el-divider><i class="el-icon-mobile-phone"></i></el-divider>
      <div class="tag-group">
        <el-tag>所属分类</el-tag><span class="tag-group__title">{{tableData.pCategoryId}}</span>
      </div>
      <el-divider><i class="el-icon-mobile-phone"></i></el-divider>
      <div class="tag-group">
        <el-tag>规格属性</el-tag><span class="tag-group__title">{{tableData.specAttr}}</span>
      </div>
      <el-divider><i class="el-icon-mobile-phone"></i></el-divider>
      <div class="tag-group">
        <el-tag>商品图片</el-tag><span class="tag-group__title">{{tableData.imgs}}</span>
      </div>
      <el-divider><i class="el-icon-mobile-phone"></i></el-divider>
      <div class="tag-group">
        <el-tag>商品详情</el-tag><span class="tag-group__title" v-html="tableData.detail"></span>
      </div>
      <el-divider><i class="el-icon-mobile-phone"></i></el-divider>
    </div>
    

  </div>
</template>
<script>
export default {
  data() {
    return {
      
    };
  },
  methods: {
    goBack() {
      console.log("go back");
    },
  },
  computed: {
    tableData(){
      return this.$store.state.products.productinfo
    }
  }
};
</script>
<style >
.tag-group {
  margin: 8px 0 8px 20px;
}
.tag-group .el-tag {
  height: 20px;
  line-height: 20px;
  margin-right: 15px;
}

</style>